package com.binhthuan.catechist.client.grid;

import com.binhthuan.catechist.client.ECApplication;
import com.binhthuan.catechist.client.data.AreaDS;
import com.binhthuan.catechist.shared.constant.Parameter;
import com.smartgwt.client.widgets.grid.ListGridField;

public class AreaGrid extends AbstractGrid {

    public AreaGrid(AreaDS dataSource) {
        super(dataSource);
        setWrapCells(true);

        ListGridField idField = new ListGridField(Parameter.ID);
        idField.setHidden(true);
        idField.setCanHide(false);

        ListGridField nameField = new ListGridField(Parameter.NAME);
        nameField.setTitle(ECApplication.getConstants().area());

        setSortField(Parameter.NAME);
        setFields(idField, nameField);
    }
}
